#include "DifficultySelectMenu.h"

DifficultySelectMenu::DifficultySelectMenu()
{

}

DifficultySelectMenu::~DifficultySelectMenu(void)
{
}

void DifficultySelectMenu::loadTextures(Difficulty diff){
	if(diff == EASY){
	loadOpenGL2DTextureBMP("easyintro.bmp", &image, GL_RGB);
	}
	else if(diff == MEDIUM){
	loadOpenGL2DTextureBMP("mediumintro.bmp", &image, GL_RGB);
	}
	else if(diff == HARD){
	loadOpenGL2DTextureBMP("hardintro.bmp", &image, GL_RGB);
	}
	else if(diff == NOTDIFFICULT){
	loadOpenGL2DTextureBMP("difficultyselect.bmp", &image, GL_RGB);
	}
	else if(diff == EASYENDING){
	loadOpenGL2DTextureBMP("easyending.bmp", &image, GL_RGB);
	}
	else if(diff == MEDIUMENDING){
	loadOpenGL2DTextureBMP("mediumending.bmp", &image, GL_RGB);
	}
	else if(diff == HARDENDING){
	loadOpenGL2DTextureBMP("hardending.bmp", &image, GL_RGB);
	}
	else if(diff == TUTOR){
	loadOpenGL2DTextureBMP("tutorial.bmp", &image, GL_RGB);
	}

}

void DifficultySelectMenu::draw(){
	glDisable(GL_LIGHTING);
	glMatrixMode( GL_PROJECTION );
	glPushMatrix();    
	glLoadIdentity();
	glOrtho( 0.0, 800, 0.0, 600, -1.0, 1.0 );
	glMatrixMode( GL_MODELVIEW );
	glPushMatrix();    
	glLoadIdentity();
	glEnable(GL_TEXTURE_2D);
	glBindTexture(GL_TEXTURE_2D, image);

	glColor3f(1, 1, 1); 

	glBegin(GL_QUADS);

	glTexCoord2f(0.0f, 0.0f); glVertex3f(0, 0,  0);	// Bottom Left Of The Texture and Quad
	glTexCoord2f(1.0f, 0.0f); glVertex3f( 800, 0,  0);	// Bottom Right Of The Texture and Quad
	glTexCoord2f(1.0f, 1.0f); glVertex3f( 800,  600,  0);	// Top Right Of The Texture and Quad
	glTexCoord2f(0.0f, 1.0f); glVertex3f(0,  600,  0);	// Top Left Of The Texture and Quad

	glEnd();	
	glDisable(GL_TEXTURE_2D);


	//Unsets Projection Mode
	glMatrixMode( GL_PROJECTION );
	glPopMatrix();  
	glMatrixMode( GL_MODELVIEW );
	glPopMatrix(); 
}